package a;

import java.util.Arrays;
import java.util.Scanner;

public class bianli {

	public static void main(String[] args) {
		double sum=0;
		double a;
		Scanner scanner=new Scanner(System.in);
		a=scanner.nextDouble();
		if(a>=1&&a<=90) {
			sum=0.6*a;
		}
		if(a>=91&&a<=150) {
			sum=1.1*(a-90)+0.6*90;
		}
		if(a>=151) {
			sum=1.7*(a-150)+0.6*90+1.1*60;
		}
		System.out.println(sum);
	}

}
